angular.module('Controller')
.controller 'PageContainerCtrl', ($scope, $state) ->
    _.extend $scope,
        clickMenu: (item)->
            if item.type == "page"
                if item.id == undefined
                    $state.go item.route
                else
                    $state.go item.route, {childId: item.id}
            else if item.type == "subPage"
                $state.go item.route, {childId: item.id}
            else if item.type == "link"
                window.location.href = item.route